# -*- coding:utf-8 -*-

def findMinAndMax(L):
    if len(L)!= 0:
        min = max = L[0]
        for n in L:
            if n < min:
                min = n
            if n > max:
                max = n
            return(min,max)
    else:
        return(None,None)